package com.longshine.log;

import com.longshine.platform.equip.tcp.ProtocolDispacher;
import com.longshine.platform.equip.tcp.ProtocolUtil;
import com.longshine.tools.util.CommonUtil;


public class Log {

	public static void println(Object o){
		System.out.println(CommonUtil.getCurrentTime()+","+o);
	}
	
	public static void logSendComm(String str){
		int code = ProtocolUtil.getFunctionData(str);
		if(code != ProtocolDispacher.FUNCTION_HEARTBRET){
			println("send:"+str);
		}
	}
	public static void logRecvComm(String str){
		int code = ProtocolUtil.getFunctionData(str);
		if(code != ProtocolDispacher.FUNCTION_REPLY){
			println("recv:"+str);
		}
	}
}
